﻿using DataWorks_Sqlite.MappingClass;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataWorks_Sqlite.MappingClassConfig
{
    internal class dw_props_dbcmessagetransfer : IEntityTypeConfiguration<dw_props_dbcmessage>
    {
        public void Configure(EntityTypeBuilder<dw_props_dbcmessage> builder)
        {
            builder.ToTable("dw_props_dbcmessage");
            builder.HasKey(b => b.key);
            builder.Property(a => a.loginname).HasMaxLength(255).IsRequired();
            builder.Property(a => a.vehicle).HasMaxLength(255).IsRequired();
            builder.Property(a => a.project).HasMaxLength(255).IsRequired();
            builder.Property(a => a.ecnumber).HasMaxLength(255).IsRequired();
            builder.Property(a => a.originaldatapath).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.savedatapath).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.selecteddirectory).HasMaxLength(2000).IsRequired();
            builder.Property(a => a.dbcpath).HasMaxLength(2000).IsRequired();
        }
    }
}
